<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>PrettyProlog implementation details - the Data Types Module</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="Emacs">
<style type="text/css">
@import url("../style.css");
</style>
</head>
<body>
<div id="container">
    <div id="header">
        <h1>PrettyProlog - the Data Types Module</h1>
    </div>
    <div id="content">
	<p align="left">
	    The Data Types Module (package <code>prettyprolog.datatypes</code>) includes the data types that are commonly used throughout many other PrettyProlog modules. From this point of view, the Data Types Module is the lowest-level one. Most classes in this package don't have an active behaviour, they serve only to hold data and perform simple operations on it. The only exception is the SymbolFactory class, which provides static methods to generate new Symbols so that, for example, two Symbols can be compared with a simple O(1) pointer comparison instead of a O(n) string comparison.<br />Also, a String and a Real number data type are provided, although as of now there is very little language support for them (strings and numbers get parsed correctly and are understood by the Unifier, but no useful operations can be performed on them).<br />
	For further info, see the javadocs.
	</p>
	<p align="left">
	    <h4>Extending PrettyProlog: Adding new data types</h4>
	    A possible extension of PrettyProlog might be the addition of new data types. The first step is to create an implementation of the Term interface. You can extend the AbstractTerm class which provides default implementations for most of Term's methods, hopefully making your life easier.<br />
	    However, to integrate the new types with the rest of the system, other parts must be extended/modified, notably the Parser (to be able to read the new Terms from a stream) and the Unifier (so that your Terms can be unified with other Terms). Take a look at those modules, too.
	</p>
    </div>
    <div id="footer"><a href="../index.html">General info</a> | <a href="../javadoc/index.html">Javadocs</a> | <a href="index.html">Implementation details</a></div>
</div>
</body>
</html>